package com.aube.phone;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.aube.AubeApplication;
import com.aube.activity.PluginMainActivity;
import com.aube.video.ad.VideoAdHelper;
import com.huyn.baseframework.share.QQUtil;
import com.huyn.baseframework.share.WeiboConstants;
import com.huyn.baseframework.utils.Constant;

/**
 * Created by huyaonan on 16/6/16.
 */
public class LaunchApplication extends AubeApplication {

    @Override
    public void onCreate() {
        super.onCreate();

        //设置api相关key和微信的appid
        Constant.setAppKeyAndSecret("thephone-android", "f5835541d842a30f3b7a03962c091950", "wx1157b653ce8ecbb2");

        //设置微博的key
        WeiboConstants.APP_KEY = "2738780509";

        //设置广告id
        VideoAdHelper.setAdId("3036864", "3036848");

        //设置qq的key
        QQUtil.APP_ID = "";
    }

    @Override
    public void registMiPush() {
        registMiPush("2882303761517489378", "5741748913378");
    }

    @Override
    public void enableJPush() {
        enableJPush(this);
    }

    @Override
    public void disableJPush() {
        disableJPush(this);
    }

    public void startActivity(Context context, Bundle bundle) {
        Intent aIntent = new Intent();
        aIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        aIntent.setClass(context, PluginMainActivity.class);
        aIntent.putExtras(bundle);
        context.startActivity(aIntent);
    }

}
